<!doctype html>
<html>
 <head>
  <meta charset="UTF-8">  
  <title>修改视频信息</title>
 </head>
 <body>
 <?php
   require_once('inc_admin.php');  
   connect();
   $id = $_GET['id'];  
   $sql = "select * from videos where vid={$id}";   
   //$result = mysql_query($sql) or die('查询失败！'.mysql_error());   
   //$row = mysql_fetch_assoc($result);
   $row=fetch_one($sql);
   //var_dump($row);   
	//将查询结果显示在表单中
 ?>
<form method="post"  action="videoupdate.php"  enctype="multipart/form-data">
<table align="center" border="1" width=500>
<caption>修改视频类别</caption>
<tr>
  <td width="20%">id</td>
  <td width="80%"><?php  echo $id;  ?>
  <input type="hidden" name="id" value=<?php  echo $row['vid']; ?>>  
  </td>
</tr>
<tr>
  <td>视频名称：</td>
  <td><input type="text" name="videoname" size=30  value=<?php  echo $row['videoname'];  ?>></td>
</tr>
<tr>
    <td>视频类型：</td>
  <td><input type="text" name="tid" size=30  value=<?php  echo $row['tid'];  ?>></td>
</tr>
<tr>
    <td>视频海报：</td>
  <td><input type="file" name="pic" size=30  value=<?php  echo $row['pic'];  ?>></td>
</tr>
<tr>
    <td>视频简介：</td>
  <td><input type="text" name="intro" size=30  value=<?php  echo $row['intro'];  ?>></td>
</tr>
<tr>
    <td>下载地址：</td>
  <td><input type="text" name="address" size=30  value=<?php  echo $row['address'];  ?>></td>
</tr>
<tr>
<td width=150></td>
<td>
<input type="submit" value="更新">
<input type="reset" value="重置">
</td>
</tr>
</table>
</form>
 </body>
</html>

